package org.linlinjava.litemall.db.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("lumiere_coupon_user")
public class LumiereCouponUser {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.AUTO)
    private Long id;

    private Integer userId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long strategyId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long couponId;
    private LocalDateTime usedTime;
    private LocalDateTime startTime;
    private LocalDateTime endTime;

    private Integer orderId;
    private Integer shopId;
    private String userName;

    private String code;
    @JsonSerialize(using = ToStringSerializer.class)
    private LocalDateTime addTime;
    private LocalDateTime updateTime;
    private Boolean deleted;
}
